home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #2 / Amiga Plus CD - 2004 - No. 02.iso / AmiSoft / Util / virus / xvslibrary.lha / xvs / Developer / ASM / libraries / xvs.i
Text File  |  2004-01-15  |  5KB  |  144 lines

  1.     IFND    LIBRARIES_XVS_I
  2. LIBRARIES_XVS_I    SET    1
  3.  
  4. **
  5. **    $VER: xvs.i 33.37 (01.11.2001)
  6. **
  7. **    Copyright © 1997-2001 by Georg Hörmann
  8. **    All Rights Reserved
  9. **
  10.  
  11.     IFND EXEC_LIBRARIES_I
  12.     include "exec/libraries.i"
  13.     include "exec/lists.i"
  14.     ENDC
  15.  
  16. ;======================================================================
  17. ; Library Base
  18. ;======================================================================
  19.  
  20. ; xvsBase structure has become completely private with version 33.37 !!
  21. ; For compatibility reasons, the fields that were not marked PRIVATE in
  22. ; the original structure are guaranteed to be there in all the future
  23. ; versions too. But please don't use this stuff in new code any longer!
  24. xvs_DosBase    equ    40
  25. xvs_ExecBase    equ    44
  26.  
  27. XVS_VERSION    equ    33    ;for OpenLibrary()
  28.  
  29. XVS_NAME    MACRO
  30.         dc.b    "xvs.library",0
  31.         ENDM
  32.  
  33. ;======================================================================
  34. ; Virus List
  35. ;======================================================================
  36.  
  37.     STRUCTURE    xvsVirusList,LH_SIZE
  38.     UWORD    xvsvl_Count        ; amount of entries
  39.     LABEL    xvsVirusList_SIZE
  40.  
  41. ; values for xvsVirusList->LH_TYPE and xvsCreateVirusList()
  42.  
  43. XVSLIST_BOOTVIRUSES    equ    $42
  44. XVSLIST_DATAVIRUSES    equ    $44    ; (V33.34)
  45. XVSLIST_FILEVIRUSES    equ    $46
  46. XVSLIST_LINKVIRUSES    equ    $4c
  47.  
  48. ;======================================================================
  49. ; Object Types
  50. ;======================================================================
  51.  
  52. XVSOBJ_BOOTINFO        equ    1    ; xvsBootInfo structure
  53. XVSOBJ_SECTORINFO    equ    2    ; xvsSectorInfo structure
  54. XVSOBJ_FILEINFO        equ    3    ; xvsFileInfo structure
  55. XVSOBJ_MEMORYINFO    equ    4    ; xvsMemoryInfo structure
  56. XVSOBJ_MAX        equ    4    ; PRIVATE
  57.  
  58. ;======================================================================
  59. ; Bootblock Info
  60. ;======================================================================
  61.  
  62.     STRUCTURE    xvsBootInfo,0
  63.     APTR    xvsbi_Bootblock        ; buffer holding bootblock
  64.     APTR    xvsbi_Name        ; description of bootblock
  65.     UBYTE    xvsbi_BootType        ; type of bootblock
  66.     UBYTE    xvsbi_DosType        ; dos type (eg. DOS0 -> 0)
  67.     UBYTE    xvsbi_ChkSumFlag    ; TRUE if checksum correct
  68.     UBYTE    xvsbi_Reserved0        ; PRIVATE
  69.     LABEL    xvsBootInfo_SIZE
  70.  
  71. ; values for xvsBootInfo->xvsbi_BootType and xvsInstallBootblock()
  72.  
  73. XVSBT_UNKNOWN        equ    0    ; Unknown bootblock
  74. XVSBT_NOTDOS        equ    1    ; Not a DOS bootblock
  75. XVSBT_STANDARD13    equ    2    ; Standard bootblock (1.3)
  76. XVSBT_STANDARD20    equ    3    ; Standard bootblock (2.0)
  77. XVSBT_VIRUS        equ    4    ; xvsbi_Name = virus name
  78. XVSBT_UNINSTALLED    equ    5    ; ONLY xvsInstallBootblock()
  79.  
  80. ;======================================================================
  81. ; Sector Info
  82. ;======================================================================
  83.  
  84.     STRUCTURE    xvsSectorInfo,0
  85.     APTR    xvssi_Sector        ; buffer holding sector
  86.     ULONG    xvssi_Key        ; sector number
  87.     APTR    xvssi_Name        ; description of sector
  88.     UBYTE    xvssi_SectorType    ; type of sector
  89.     UBYTE    xvssi_InternalType    ; PRIVATE
  90.     LABEL    xvsSectorInfo_SIZE
  91.  
  92. ; values for xvsSectorInfo->xvssi_SectorType
  93.  
  94. XVSST_UNKNOWN        equ    0    ; Unknown sector
  95. XVSST_DESTROYED        equ    1    ; xvssi_Name = virus name
  96. XVSST_INFECTED        equ    2    ; xvssi_Name = virus name
  97.  
  98. ;======================================================================
  99. ; File Info
  100. ;======================================================================
  101.  
  102.     STRUCTURE    xvsFileInfo,0
  103.     APTR    xvsfi_File        ; buffer holding whole file
  104.     ULONG    xvsfi_FileLen        ; length of file
  105.     APTR    xvsfi_Name        ; description of file
  106.     UBYTE    xvsfi_FileType        ; type of file
  107.     UBYTE    xvsfi_ModifiedFlag    ; TRUE if file was modified
  108.     UBYTE    xvsfi_ErrorCode        ; only for xvsRepairFile()
  109.     UBYTE    xvsfi_InternalType    ; PRIVATE
  110.     APTR    xvsfi_Fixed        ; start of fixed file
  111.     ULONG    xvsfi_FixedLen        ; length of fixed file
  112.     LABEL    xvsFileInfo_SIZE
  113.  
  114. ; values for xvsFileInfo->xvsfi_FileType
  115.  
  116. XVSFT_EMPTYFILE        equ    1    ; Empty file
  117. XVSFT_DATAFILE        equ    2    ; Data file
  118. XVSFT_EXEFILE        equ    3    ; Executable file
  119. XVSFT_DATAVIRUS        equ    4    ; xvsfi_Name = virus name
  120. XVSFT_FILEVIRUS        equ    5    ; xvsfi_Name = virus name
  121. XVSFT_LINKVIRUS        equ    6    ; xvsfi_Name = virus name
  122.  
  123. ; values for xvsFileInfo->xvsfi_ErrorCode
  124.  
  125. XVSERR_WRONGFILETYPE    equ    1    ; Wrong type of file
  126. XVSERR_FILETRUNCATED    equ    2    ; File truncated
  127. XVSERR_UNSUPPORTEDHUNK    equ    3    ; Unsupported hunk
  128. XVSERR_UNEXPECTEDDATA    equ    4    ; Unexpected data
  129. XVSERR_OUTOFMEMORY    equ    5    ; Out of memory
  130. XVSERR_NOTIMPLEMENTED    equ    6    ; (V33.15) Not implemented yet
  131.  
  132. ;======================================================================
  133. ; Memory Info
  134. ;======================================================================
  135.  
  136.     STRUCTURE    xvsMemoryInfo,0
  137.     UWORD    xvsmi_Count        ; amount of detected viruses
  138.     UWORD    xvsmi_Reserved0        ; PRIVATE
  139.     STRUCT    xvsmi_NameArray,5*4    ; names of viruses
  140.     LABEL    xvsMemoryInfo_SIZE
  141.  
  142.  
  143.     ENDC    ; LIBRARIES_XVS_I
  144.